#!/usr/bin/env python
# -*-coding:utf-8-*-
# File    : liyuqi.py

import os
import sys
import pytest
from example import plus

test_data = [('1+2', '3'), ('5+8', '13')]


def pytest_generate_tests(metafunc):
    if "num1" in metafunc.fixturenames and "num2" in metafunc.fixturenames:
        metafunc.parametrize(
            "num1,num2",
            test_data,
            ids=map(
                lambda x: x[0],
                test_data),
            scope="function")


def test_success(num1, num2):
    assert plus(num1, num2) == num1 + num2
